<%--
  Created by IntelliJ IDEA.
  User: 黑白客
  Date: 2019/5/28
  Time: 17:27
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%
    out.print("你的IP地址"
            + request.getRemoteAddr());
%>
<%--该部分注释在页面上不会显示--%>
<p>
    今天的日期是：<%=
    (new java.util.Date()).toLocaleString()
%>
</p>

<%--判断语句--%>
<%int day = 2; %>
<%if (day == 1 | day == 7){%>
    <p>今天是周末</p>
<%}else {%>
    <p>今天不是周末</p>
<%}%>

<%--循环语句--%>
<%
switch(day){
    case 0:
    out.print("星期天");
    break;

    case 1:
    out.print("星期1");
    break;

    case 2:
        out.print("星期2");
        break;

    case 3:
        out.print("星期3");
        break;

     default:
         out.print("不存在的");
}
%>
<br/>
<%int fontSize;%>
<%for (fontSize = 1; fontSize <= 3; fontSize ++){%>
    <font color="#a52a2a" size="<%=fontSize %>">黑白客</font><br/>
<%}%>
</body>
</html>